package com.flea.repository.es;

import com.flea.model.ProductDoc;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ProductDocRepository extends ElasticsearchRepository<ProductDoc, String> {

    Page<ProductDoc> findByNameOrDesc(String name, String desc, Pageable pageable);

    int deleteByProductId(Integer id);

}
